import React from 'react';
import './model.less'
class Modal extends React.Component {
    render() {
        let { visible, onOk, onCancel, children } = this.props;
        return <>
            {
                visible ?
                    <div className='modal_box'>
                        
                        <div>
                            {children || <h4>哈哈哈</h4>}
                        </div>
                        <button onClick={onOk}>OK</button>
                        <button onClick={onCancel}>cancel</button>
                    </div> :
                    ''
            }
        </>;
    }
}
export default Modal